home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / tcl / tclx7.5a- / tclx7 / usr / local / tkX / 4.1a-a2 / demos / hello < prev    next >
Encoding:
Text File  |  1995-11-14  |  485 b   |  19 lines

  1. #!/bin/sh
  2. # the next line restarts using wish \
  3. exec wishx "$0" "$@"
  4.  
  5. # hello --
  6. # Simple Tk script to create a button that prints "Hello, world".
  7. # Click on the button to terminate the program.
  8. #
  9. # @(#) hello 1.5 95/09/07 11:13:16
  10. # The first line below creates the button, and the second line
  11. # asks the packer to shrink-wrap the application's main window
  12. # around the button.
  13.  
  14. button .hello -text "Hello, world" -command {
  15.     puts stdout "Hello, world"; destroy .
  16. }
  17. pack .hello
  18.